// import { defineStore } from "pinia";



// export const useStore = defineStore('index', {
//     state:()=>({
//         user:{}
//     }),
//     actions:{
//         setUser(value:any){
//             this.user = value
//         }
//     },
//     persist:true
// })

import { defineStore } from "pinia";
import { createPinia } from 'pinia'
import persist from 'pinia-plugin-persistedstate'

const pinia = createPinia()
pinia.use(persist)

export const useStore = defineStore('index', {
    state: () => ({
        user: {}
    }),
    actions: {
        setUser(value: any) {
            this.user = value
        }
    },
    persist:true
});

export default pinia
